<!DOCTYPE html>
<html
  lang="en"
  xmlns:th="http://www.thymeleaf.org"
  th:replace="~{modules/layout :: html(title = ${theme.config.journals.journals_title ?: '我的动态'} + '-' + ${site.title},htmlType = journals,header = null,leftSidebar = true,content = ~{::content}, head = null, footer = null)}"
>
  <th:block th:fragment="content">
    <body>
      <div id="Joe">
        <th:block th:replace="~{modules/macro/navbar :: navbar}" />
        <div
          class="joe_container joe_main_container page-journals"
          th:classappend="|${theme.config.theme.enable_show_in_up ? 'animated showInUp' : ''} ${theme.config.aside.aside_position == 'left' ? 'revert' : ''}|"
        >
          <div class="joe_main">
            <div class="joe_detail">
              <h1 class="joe_detail__title txt-shadow">[[${theme.config.journals.journals_title ?: '我的动态'}]]</h1>
              <th:block th:if="${theme.config.journals.enable_journal_add}">
                <a
                  class="joe_journal_add"
                  th:href="@{/console/moments}"
                  target="_blank"
                  rel="nofollow"
                >
                  <i class="joe-font joe-icon-edit"></i>
                </a>
              </th:block>
              <div class="joe_detail__count">
                <div class="joe_detail__count-information">
                  <img
                    class="avatar lazyload"
                    width="35"
                    height="35"
                    th:data-src="${theme.config.blogger.avatar ?: theme.config.blogger.default_avatar}"
                    th:src="${theme.config.blogger.lazyload_avatar}"
                    th:alt="${theme.config.blogger.nickname ?: site.title}"
                  />
                  <div class="meta">
                    <div class="author">
                      <a
                        class="link"
                        th:title="${theme.config.blogger.nickname ?: site.title}"
                        th:href="'/moments'"
                        rel="noopener noreferrer"
                      >
                        [[${theme.config.blogger.nickname ?: site.title}]]
                      </a>
                    </div>
                    <div class="item">
                      <span class="text">[[${theme.config.blogger.motto ?: ''}]]</span>
                      <th:block th:if="${theme.config.other.check_baidu_collect}">
                        <span class="line">/</span>
                        <span id="joe_baidu_record" class="text">正在检测是否收录...</span>
                      </th:block>
                    </div>
                  </div>
                </div>
              </div>
              <th:block th:replace="~{modules/macro/loading :: loading}" />
              <ul
                class="joe_journals__list hidden"
                th:classappend="${theme.config.journals.enable_journal_effect ? 'effects' : ''}"
              >
                <th:block th:each="moment,iteration : ${moments.items}" th:with="content=${moment.spec.content}">
                  <li
                    class="joe_journal__item animated wow"
                    th:data-wow-delay="'0.'+${iteration.index}+'s'"
                    th:data-cid="${moment.metadata.name}"
                    th:data-clikes="${moment.stats.upvote}"
                  >
                    <p class="joe_journal_date">
                      <i class="joe-font joe-icon-feather"></i>
                      <em class="joe_journal-posttime">
                        [[${#dates.format(moment.spec.releaseTime,'yyyy/MM/dd HH:mm:ss')}]]
                      </em>
                    </p>
                    <div class="joe_journal_block">
                      <div
                        class="joe_journal_body"
                        th:classappend="${(theme.config.code_block.enable_code_line_number == true && theme.config.code_block.enable_code_newline != true) ? 'line-numbers' : ''}"
                        th:style="'max-height:'+${theme.config.journals.journal_block_height?: '300'}+'px'"
                      >
                        <div class="content-wrp">
                          <th:block th:utext="${content.html}"></th:block>
                          <th:block
                            th:if="${not #lists.isEmpty(content.medium)}"
                            th:each="momentItem : ${content.medium}"
                          >
                            <img th:if="${momentItem.type.name == 'PHOTO'}" th:src="${momentItem.url}" />
                            <joe-dplayer
                              th:if="${momentItem.type.name == 'VIDEO'}"
                              th:src="${momentItem.url}"
                            ></joe-dplayer>
                          </th:block>
                        </div>
                        <span class="joe_journal_operate_item journal_content_expander">
                          <i class="joe-font joe-icon-arrow-down"></i>
                        </span>
                      </div>
                      <th:block
                        th:if="${theme.config.journals.enable_like_journal} or ${theme.config.journals.enable_comment_journal}"
                      >
                        <div class="joe_journal_footer">
                          <div class="footer-wrap">
                            <th:block th:if="${theme.config.journals.enable_like_journal}">
                              <span class="joe_journal_operate_item like">
                                <i class="joe-font joe-icon-xihuan journal-like"></i>
                                <i class="joe-font joe-icon-xihuan-fill journal-unlike"></i>
                                <em class="journal-likes-num">[[${moment.stats.upvote}]]</em>
                              </span>
                            </th:block>
                            <th:block
                              th:if="${theme.config.journals.enable_comment_journal} and ${theme.config.other.enable_clean_mode != true}"
                            >
                              <span class="joe_journal_operate_item comment">
                                <i class="joe-font joe-icon-message journal-comment"></i>
                                <em>[[${moment.stats.totalComment}]]</em>
                              </span>
                              <th:block th:if="${moment.stats.totalComment gt 0}">
                                <span class="joe_journal_operate_item journal_comment_expander">
                                  <em class="journal_comment_expander_txt">查看评论</em>
                                  <i class="joe-font joe-icon-arrow-downb"></i>
                                </span>
                              </th:block>
                            </th:block>
                            <th:block
                              th:if="${theme.config.journals.enable_comment_journal} and ${theme.config.other.enable_clean_mode != true}"
                            >
                              <div class="joe_journal_comment">
                                <halo:comment
                                  group="moment.halo.run"
                                  kind="Moment"
                                  th:attr="name=${moment.metadata.name}"
                                  colorScheme="document.documentElement.getAttribute('data-mode')"
                                />
                              </div>
                            </th:block>
                          </div>
                        </div>
                      </th:block>
                    </div>
                  </li>
                </th:block>
              </ul>
              <th:block th:replace="~{modules/common/pagination :: moments}" />
            </div>
          </div>
          <th:block th:if="${theme.config.aside.enable_aside} and ${theme.config.aside.enable_journals_aside}">
            <th:block th:replace="~{modules/common/aside :: aside}" />
          </th:block>
        </div>
        <th:block th:replace="~{modules/common/actions :: actions}" />
        <th:block th:if="${theme.config.footer.enable_footer}">
          <th:block th:replace="~{modules/common/footer :: footer}" />
        </th:block>
      </div>
      <th:block th:replace="~{modules/macro/tail :: tail}" />
    </body>
  </th:block>
</html>
